package cn.edu.zzuli.admin.mapper;


import cn.edu.zzuli.model.dto.admin.UserInfoDto;
import cn.edu.zzuli.model.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    @Select("select nick_name from user where uid = #{uid}")
    String getNickName(Integer uid);

    @Select("select uid,nick_name,locked,user.update_time,user.create_time,tel,college,name," +
            "stu_id from user join identity on uid = iuid and uid = #{uid}")
    UserInfoDto selectOneUserInf(Integer id);
}
